import 'dart:math';

import 'package:get/get.dart';

class PutSameClassController extends GetxController {
  int id = 0;
  var name = "".obs;

  /// 返回随机对象
  static PutSameClassController randomInstance() {
    PutSameClassController obj = PutSameClassController();
    int id = _randomInt();
    obj.id = id;
    obj.name.value = "name:$id";
    return obj;
  }

  /// 随机字符串
  static int _randomInt() {
    Random random = Random();
    return random.nextInt(100000000);
  }
}